<template>
  <div>
    <van-tabs v-model="activeid">
      <van-tab title="已完成" >
        <active-completed/>
      </van-tab>
      <van-tab title="已报名" >
        <active-signup/>
      </van-tab>
      <van-tab title="已取消">
        <active-cancelled/>
      </van-tab>
    </van-tabs>
    <!-- <van-grid :column-num="2">
      <van-grid-item
        v-for="item in list"
        :key="item.id"
        :text="item.name"
        @click="gotoactive(item.id)"
      />
    </van-grid> -->
  </div>
</template>

<script>
import ActiveCancelled from '../cancelled/ActiveCancelled.vue';
import ActiveCompleted from '../completed/ActiveCompleted.vue';
import ActiveSignup from '../signup/ActiveSignup.vue';
import { categoryList } from "@/service/active/active";

export default {
  components: { ActiveCompleted, ActiveSignup, ActiveCancelled },
  data() {
    return {
      activeid: '',
      list: [],
    };
  },
  async created() {
    let { data } = await categoryList();
    // console.log(data);
    this.list = { data }.data.data;
    console.log(this.list);
  },
  // methods: {
  //   gotoactive(id) {
  //     // console.log(id);
  //     this.$router.push({ path: "/" + id });
  //     this.$route.query.name
  //   },
  // },
};
</script>

<style>
</style>